We only "watch" the 'org.gnome.Shell.Notifications' name to start the
service, not to actually monitor name owner changes; so unwatch the
name once that's done.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/2381
shellDBusService = new ShellDBus.GnomeShell();
shellMountOpDBusService = new ShellMountOperation.GnomeShellMountOpHandler();
- Gio.DBus.session.watch_name('org.gnome.Shell.Notifications',
- Gio.BusNameWatcherFlags.AUTO_START, null, null);
+ const watchId = Gio.DBus.session.watch_name('org.gnome.Shell.Notifications',
+ Gio.BusNameWatcherFlags.AUTO_START,
+ bus => bus.unwatch_name(watchId),
+ bus => bus.unwatch_name(watchId));
_sessionUpdated();
}